<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // ES6允许在大括号李，直接写入变量和函数作为对象的属性和方法

        let name = 'JavaScript'
        let run = function() {
            console.log('run...')
        }

        const person = {
            name,
            run,
            // 函数还可以这样简化，属性key就是say
            say() {

            }
        }
        console.log(person)

    </script>
</body>
</html>